package com.hxexp.weixin.mvc.common.service;

import javax.servlet.http.HttpServletResponse;

import com.hxexp.weixin.common.exception.ServiceException;

/**
 * 网页授权服务
 *
 * <p>
 * 获取微信用户相关信息
 *
 * @author li.jiang
 *
 */
public interface SNSOauth2Service {
    /**
     * 获取openid并写入cookie
     * 
     * @param code
     *            换取web access token的code
     * @param response
     *            http响应
     * @return openid
     * @throws ServiceException
     */
    public String setOpenid2Cookie(String code, HttpServletResponse response) throws ServiceException;
}
